<?php
namespace App\Services;

use EasyWeChat\Factory;

class Wechat
{
    static function pay(){
        $config=config('wechat.pay');
//        dd($config);
        $app=Factory::payment($config);
        return $app->order->unify([
            'body' => '会员充值',
            'out_trade_no' => time().rand(100,999),
            'total_fee' => 1,
            'notify_url' => 'http://four.doumvips.com/notify/pay',
            'trade_type' => 'MWEB'
        ]);
    }
}
